<?php

namespace App\Models\goods;

use App\Models\base\traits\HasGoods;
use App\Models\base\traits\HasOrder;
use App\Models\base\traits\HasOwner;
use App\Models\base\traits\ImgTrait;
use Illuminate\Database\Eloquent\Model;




/**
 * App\Models\goods\OrderDetail
 *
 * @property int $id
 * @property int $order_id
 * @property int $goods_id 商品ID
 * @property int $user_id 关联用户ID
 * @property string $type_name 类型名
 * @property string $goods_name 商品名
 * @property string $goods_img 商品图片
 * @property string $spec 规格
 * @property int $num 购买数量
 * @property float $price 单价
 * @property float $total_price 总价
 * @property float $old_price 原价
 * @property float $postage 邮费
 * @property string|null $pay_info
 * @property string|null $remark
 * @property float $rebate_money 返点总金额
 * @property string $price_field 使用的价格字段
 * @property string $evaluate 商品评价
 * @property string $imgs 商品评价图
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @property-read mixed $header_img
 * @property-read mixed $icon
 * @property mixed $icons
 * @property mixed $img
 * @property mixed $parameter
 * @property-read \App\Models\goods\Goods $goods
 * @property-read \App\Models\goods\Order $order
 * @property-read \App\Models\User $user
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\goods\OrderDetail newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\goods\OrderDetail newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\goods\OrderDetail owner($userId)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\goods\OrderDetail query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\goods\OrderDetail whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\goods\OrderDetail whereEvaluate($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\goods\OrderDetail whereGoodsId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\goods\OrderDetail whereGoodsImg($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\goods\OrderDetail whereGoodsName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\goods\OrderDetail whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\goods\OrderDetail whereImgs($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\goods\OrderDetail whereNum($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\goods\OrderDetail whereOldPrice($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\goods\OrderDetail whereOrderId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\goods\OrderDetail wherePayInfo($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\goods\OrderDetail wherePostage($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\goods\OrderDetail wherePrice($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\goods\OrderDetail wherePriceField($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\goods\OrderDetail whereRebateMoney($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\goods\OrderDetail whereRemark($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\goods\OrderDetail whereSpec($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\goods\OrderDetail whereTotalPrice($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\goods\OrderDetail whereTypeName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\goods\OrderDetail whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\goods\OrderDetail whereUserId($value)
 * @mixin \Eloquent
 * @property string|null $goods_alias 商品别名
 * @property string|null $spec_alias 规格别名
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\goods\OrderDetail whereGoodsAlias($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\goods\OrderDetail whereSpecAlias($value)
 */
class OrderDetail extends Model
{

    use HasOrder;
    use HasGoods;
    use HasOwner;
    use ImgTrait;

    protected $fillable = [
        'order_id',
        'goods_id',
        'type_name',
        'goods_name',
        'user_id',
        'goods_img',
        'goods_type',
        'spec',
        'num',
        'price',
        'total_price',
        'old_price',
        'pay_info',
        'remark',
        'price_field',
        'postage'
    ];



}
